
package wpc;

public class Cat {
    private String name;
    public Cat(String name){
        this.name = name;
    }
    public void printInfo(){
        System.out.println("我是"+name);
    }
    public void mew(){
        System.out.println(name+"喵喵喵");
    }

    public void eat(String food){
        System.out.println(name + "在吃" + food);
    }
    public void catchMouse(Mouse m){
        System.out.println(name + "抓住了" + m);
    }
}
